//
//  SharedViewControllers.m
//  ReceiveTask
//
//  Created by WangZhenyu on 2018/11/21.
//  Copyright © 2018 WangZhenyu. All rights reserved.
//

#import "SharedViewControllers.h"
#import "ToolViewController.h"
#import "MessageViewController.h"
#import "PersonViewController.h"

@implementation SharedViewControllers

+ (ToolViewController *)toolViewCon {
    static dispatch_once_t once;
    static ToolViewController *kViewCon = nil;
    dispatch_once(&once, ^{
        if (!kViewCon) {
            kViewCon = [[ToolViewController alloc] initWithNibName:@"ToolViewController" bundle:nil];
        }
    });
    return kViewCon;
}

+ (MessageViewController *)messageViewCon {
    static dispatch_once_t once;
    static MessageViewController *kViewCon = nil;
    dispatch_once(&once, ^{
        if (!kViewCon) {
            kViewCon = [[MessageViewController alloc] initWithNibName:@"MessageViewController" bundle:nil];
        }
    });
    return kViewCon;
}

+ (PersonViewController *)personViewCon {
    static dispatch_once_t once;
    static PersonViewController *kViewCon = nil;
    dispatch_once(&once, ^{
        if (!kViewCon) {
            kViewCon = [[PersonViewController alloc] initWithNibName:@"PersonViewController" bundle:nil];
        }
    });
    return kViewCon;
}

@end
